<template>
  <ul class="list-box">
    <li v-for="(item, index) in list" :key="index">
      <div class="logo-box"><img src="../../../../assets/img/default-user.png" alt="" ondragstart="return false"></div>
      <h2 @click="toDetails(item)">{{item.name}}</h2>
      <p class="info">
        <span style="flex:1.2">任职机构：<i class="results" :title="item.personOrAgency && item.personOrAgency.join('；')">{{item.personOrAgency.join('；')}}</i></span>
        <span style="flex:0.6">专利数量：<i>{{item.count}}</i></span>
        <span style="flex:1.2">优势领域：<i :title="item.area.join('；')">{{item.area.join('；')||'暂无'}}</i></span>
      </p>
      <p class="info">
        <span style="flex:1">科技成果：<i class="results">暂无</i></span>
      </p>
    </li>
  </ul>
</template>

<script>
export default {
  data() {
    return {
      list: []
    }
  },
  methods: {
    init() {
      this.list = [
        {
          area: ['电池组','覆层的电解或电泳生产工艺方法'],
          personOrAgency: ['新源动力'],
          count: '40',
          name: '付宇',
          id: ''
        },
        {
          area: ['电池组','钎焊或脱焊'],
          personOrAgency: ['上海治臻新能源装备'],
          count: '20',
          name: '姜天豪',
          id: ''
        },
        {
          area: ['电池组','测量电变量'],
          personOrAgency: ['爱德曼氢能源装备'],
          count: '19',
          name: '徐黎明',
          id: ''
        },
      ]
    },
    toDetails(item) {
      if (item.name === '付宇') {
        let url = this.$router.resolve({
          name: 'synergyDetail'
        })
        window.open(url.href, '_blank')
      }
    }
  },
  mounted() {
    this.init()
  }
}
</script>

<style lang="scss" scoped>
.list-box {
  position: relative;
  list-style: none;
  text-align: left;
  background-color: #fff;
  li {
    position: relative;
    display: block;
    min-height: 140px;
    padding-top: 20px;
    padding-bottom: 20px;
    padding-left: 140px;
    border-bottom: 1px solid #e5e7f0;
    .logo-box {
      position: absolute;
      top: 20px;
      left: 20px;
      width: 100px;
      height: 100px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid #d9e0ee;
      box-sizing: border-box;
    }
    h2 {
      width: 100%;
      margin-bottom: 20px;
      font-size: 18px;
      font-weight: bold;
      color: #4f515b;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      cursor: pointer;
    }
    .info {
      display: flex;
      align-items: center;
      width: 100%;
      margin-top: 10px;
      span {
        flex: 1;
        padding-right: 10px;
        font-size: 12px;
        color: #86899e;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        i {
          font-style: normal;
          color: #4f515b;
        }
      }
      .results {
        width: 100%;
        color: #504da6;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
    }
  }
}
</style>